import request from '../utils/request'

export function modifyPwd(params) {
  return request({
      url: '/user/modifyPwd',
      method: 'post',
      params: params
  })
}

export function login(params) {
    return request({
        url: '/user/login',
        method: 'post',
        params: params
    })
}

export function getInfo(host) {
  return request({
    url: '/user/getInfo',
    method: 'get',
    params: { 'host': host }
  })
}
export function getRealName() {
  return request({
    url: '/user/getRealName',
    method: 'get',
  })
}

export function logout() {
  return request({
    url: '/user/logout',
    method: 'post'
  })
}

//参数:{auth_code:code,uuid:识别号,mchId:'',pluginId}
export function getTokenByCode(params) {
  return request({
    url: '/user/getTokenByCode',
    method: 'get',
    params: params
  })
}
export function sendMsg(params) {
  return request({
    url: '/user/sendMsg',
    method: 'post',
    params: params
  })
}

export function msgLogin(params) {
  return request({
    url: '/user/msgLogin',
    method: 'post',
    params: params
  })
}

export function update(params) {
        return request({
                url: '/user/update',
                method: 'post',
                params: params
        })
}

export function xuidByUserInfo(params) {
  return request({
          url: '/user/xuidByUserInfo',
          method: 'post',
          params: params
  })
}

export function realName(params) {
  return request({
      url:'/user/realName',
      method:'get',
      params:params
  })
}

export function resetPwd(data,params) {
    return request({
        url: '/user/resetPwd',
        method: 'post',
        params:params
    })
}


export function register(params) {
  return request({
      url: '/user/register',
      method: 'get',
      params:params
  })
}
export function tokenRegister(params) {
  return request({
    url: '/user/tokenRegister',
    method: 'get',
    params: params
  })
}